﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Newtonsoft.Json;
using BLL;

public partial class bgData_SheetmanageYz : System.Web.UI.Page
{
    int unit = 0;
    string strApp = "";
    string repName = "";
    public string bmp = "";

    DBbase vCrm = new DBbase();
    BLLData bd = new BLLData();

    protected void Page_Load(object sender, EventArgs e)
    {
        string param = Request["param"];
        if (param != "")
        {
            if (param == "query")
            {
                int id = Convert.ToInt32(Request["jz"]);
                string repName = HttpUtility.UrlDecode(Request["tbl"]);
                QueryTableList(id, repName);
            }
        }
        else
        {
            QueryTableList(0, "峰谷腰报表");
        }
    }

    protected void QueryTableList(int id, string repName)
    {
        string strApp = bd.retTableByUnitAndRep(unit, repName);
        object obj = new
         {
             list = strApp
         };
        string result = JavaScriptConvert.SerializeObject(obj);
        Response.Write(result);
        Response.End();
    }
}